{"ast":null,"code":"import { observable } from \"mobx\";\nimport { useState } from \"react\";\nimport { useDeprecated } from \"./utils/utils\";\nimport { useAsObservableSource } from \"./useAsObservableSource\";\nexport function useLocalStore(initializer, current) {\n  if (\"production\" !== process.env.NODE_ENV) useDeprecated(\"[mobx-react-lite] 'useLocalStore' is deprecated, use 'useLocalObservable' instead.\");\n  var source = current && useAsObservableSource(current);\n  return useState(function () {\n    return observable(initializer(source), undefined, {\n      autoBind: true\n    });\n  })[0];\n}","map":{"version":3,"mappings":"AAAA,SAASA,UAAU,QAAQ,MAAM;AACjC,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,qBAAqB,QAAQ,yBAAyB;AAO/D,OAAM,SAAUC,aAAa,CACzBC,WAAyC,EACzCC,OAAiB;EAEjB,IAAI,YAAY,KAAKC,OAAO,CAACC,GAAG,CAACC,QAAQ,EACrCP,aAAa,CACT,oFAAoF,CACvF;EACL,IAAMQ,MAAM,GAAGJ,OAAO,IAAIH,qBAAqB,CAACG,OAAO,CAAC;EACxD,OAAOL,QAAQ,CAAC;IAAM,iBAAU,CAACI,WAAW,CAACK,MAAM,CAAC,EAAEC,SAAS,EAAE;MAAEC,QAAQ,EAAE;IAAI,CAAE,CAAC;EAA9D,CAA8D,CAAC,CAAC,CAAC,CAAC;AAC5F","names":["observable","useState","useDeprecated","useAsObservableSource","useLocalStore","initializer","current","process","env","NODE_ENV","source","undefined","autoBind"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/mobx-react-lite/src/useLocalStore.ts"],"sourcesContent":["import { observable } from \"mobx\"\nimport { useState } from \"react\"\n\nimport { useDeprecated } from \"./utils/utils\"\nimport { useAsObservableSource } from \"./useAsObservableSource\"\n\nexport function useLocalStore<TStore extends Record<string, any>>(initializer: () => TStore): TStore\nexport function useLocalStore<TStore extends Record<string, any>, TSource extends object>(\n    initializer: (source: TSource) => TStore,\n    current: TSource\n): TStore\nexport function useLocalStore<TStore extends Record<string, any>, TSource extends object>(\n    initializer: (source?: TSource) => TStore,\n    current?: TSource\n): TStore {\n    if (\"production\" !== process.env.NODE_ENV)\n        useDeprecated(\n            \"[mobx-react-lite] 'useLocalStore' is deprecated, use 'useLocalObservable' instead.\"\n        )\n    const source = current && useAsObservableSource(current)\n    return useState(() => observable(initializer(source), undefined, { autoBind: true }))[0]\n}\n"]},"metadata":{},"sourceType":"module"}